#############################################################
# File: main.py
# Function: DELFINE - Program to solve the porous media flow equations using automated 
# scientific programming (Fenics) with the Finite Element Method (Dolfin) and Multigrid (pyAMG)
# Author: Bruno Luna
# Date: 03/02/11
# Modifications Date:
# 
#
#
#
#
############################################################
from dolfin import *
from assemble import assemble_elliptic
from solve import solve_eq_system
from output import delfine_plot

# Assemble elliptic (pressure) equation
V,  A, rhs,  u0 = assemble_elliptic()

# Solves equations system provenient from the variational form of the problem
x,  residuals = solve_eq_system(A, rhs)

# Plot solution, residual and compare numerical to analytical solution
delfine_plot(x,  residuals,  V,  u0)
#############################################################
